/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
  StyleSheet,
  Text,
  View
} from 'react-native';

// 组件的名字必须首字母大写！
class Houdun extends Component{
  render(){
      return(
          <View>
              <Text style={styles.houdun}>{this.props.name}我是自定义组件！</Text>
          </View>
      )
  }
}


export default class App extends Component<{}> {
  render() {
    return (
        // 根标签
        <View>
            <Houdun name='张三' />
            <Houdun name='李四'/>
            <Houdun name='王五'/>
        </View>

        
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
    houdun:{
    fontSize:50,
        color:'blue'
    }
});
